# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname="fdm"
pkgver="2.0"
pkgrel=0
pkgdesc="A simple lightweight tool of fetching, filtering and delivering emails"
url="https://github.com/nicm/fdm"
arch="all"
license="ISC"
depends=""
makedepends="tdb-dev openssl-dev zlib-dev bsd-compat-headers pcre-dev
	automake autoconf libtool"
subpackages="$pkgname-doc"
source="https://github.com/nicm/fdm/releases/download/$pkgver/fdm-$pkgver.tar.gz
	fix-base64.patch
	"
bbuuilddir="$srcdir/fdm-$pkgver"

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-pcre
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="14e923202d17083ceb3b91b3a442d7e512c37f3d29535f22d8c0c4e1d57c97acc5d5465d643ed0cf437b3945ef777a6e38da3117219c2d54dcec88ecab1e10d9  fdm-2.0.tar.gz
ec2ebaa39e653db807ed89ec162960d5734c858b1a15a92ea9dfcd34a39c803f33d0e05e7333d1878df9d5d6187da3d12249cc397d8fcdad4e3decd836cc0a59  fix-base64.patch"
